# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import http

from odoo.addons.web.controllers.main import ExcelExport, CSVExport
from odoo.addons.base_import.controllers.main import ImportController


from odoo.addons.web.controllers.main import ExcelExport, CSVExport
from odoo.addons.base_import.controllers.main import ImportController


class ImportController2(ImportController):

    @http.route('/base_import2/set_file', methods=['POST'], auth="user", csrf=False)
    def set_file2(self, file, import_id, jsonp='callback'):
        return self.set_file(file, import_id, jsonp)


class CSVExport2(CSVExport):

    @http.route('/web2/export/csv', type='http', auth="user", csrf=False)
    def index2(self, data, token):
        return self.base(data, token)


class ExcelExport2(ExcelExport):

    @http.route('/web2/export/xlsx', type='http', auth="user", csrf=False)
    def index2(self, data, token):
        return self.base(data, token)
